package nl.ceasaro.playingcards;

import java.util.List;

/**
 * <p/>
 * Abstractly represents a deck of playing cards with a type distribution.
 * The exact number and type of cards contained in the deck is defined by the
 * concrete class that implements this interface.
 * </p><p>
 * Any class inmplementing this interface should have a public default no-arg
 * constructor.
 * </p>
 *
 * @author Garrett Smith, gsmith at northwestern dot edu
 * @version Blackjack v1.0
 * @since Blackjack v1.0
 */
public interface Deck
{

   /**
    * Returns a nonrandom list of all cards contained in a fresh deck.
    * Invoking this method does not change the state of this deck.
    *
    * @return a <code>CardList</code> of {@link Card}s
    */
   public abstract List<Card> getAllCards();

   /**
    * Returns the total number of cards in the deck.
    *
    * @return the total number of cards in the deck.
    */
   public abstract int size();

   /**
    * @param color the color of which to determine number of cards
    * @return the number of cards in the deck whose color is equal to <code>color</code>.
    */
   public abstract int getNumCardsOfType(Card.Color color);

   /**
    * @param suit the suit of which to determine number of cards
    * @return the number of cards in the deck whose suit is equal to <code>suite</code>.
    */
   public abstract int getNumCardsOfType(Card.Suit suit);

   /**
    * @param value the value of which to determine number of cards
    * @return the number of cards in the deck whose value is equal to <code>value</code>.
    */
   public abstract int getNumCardsOfType(Card.Value value);

} // interface Deck
